package be.kuleuven.cs.mop.domain.model;


import java.util.HashMap;
import java.util.Set;

import javax.jws.soap.SOAPBinding.Use;

import be.kuleuven.cs.mop.domain.exceptions.TaskManagerException;
import be.kuleuven.cs.mop.domain.model.impl.Field;
import be.kuleuven.cs.mop.domain.model.impl.Schedule;




/**
 * Represents a task
 */
public interface Task {
	
	/**
	 * Returns an unmodifiable <code>Set</code> of all dependencies for this {@link Task}
	 */
	public Set<? extends Task> getDependencies();
	
	/**
	 * Returns an unmodifiable <code>Set</code> of all dependants for this {@link Task}
	 */
	public Set<? extends Task> getDependants();
	
	
	/**
	 * Returns the {@link Project} to which this {@link Task} belongs
	 * @throws TaskManagerException TASK_DOES_NOT_BELONG_TO_PROJECT - Task is not assigned to a project (yet)
	 */
	public Project getProject() throws TaskManagerException;
	
	/**
	 * Returns all {@link Reservation}s of this {@link Task}
	 */
	public Set<? extends Reservation> getReservations();
	
	/**
	 * Returns the {@link Schedule} of this {@link Task}
	 */
	public Schedule getSchedule();
	
	/**
	 * Returns the <code>TaskType</code> of this <code>Task</code>
	 */
	public TaskType getType();
	
	/**
	 * Returns a <tt>TaskStatus</tt> which represents the status of this <tt>Task</tt>
	 * @return a {@link TaskStatus}
	 */
	public TaskStatus getStatus();
	
	/**
	 * Returns the {@link Use} of this {@link Task}
	 */
	public User getUser();
	
	/**
	 * Returns the Fields of this {@link Task}
	 */
	public HashMap<String, Field> getFields();
	
	/**
	 * Determines whether or not this {@link Task} is available
	 * 
	 * @see {@link #getStatus()}
	 */
	public boolean isAvailable();
	
}